import { Component, OnInit, Input } from '@angular/core';
import { Router, NavigationEnd } from '@angular/router';

@Component({
	selector: 'app-sidebar',
	templateUrl: './sidebar.component.html',
	styleUrls: ['./sidebar.component.scss']
})
export class AppSidebarComponent implements OnInit {

	@Input() public layoutMode: String = "";

	@Input() public links: Array<any> = [];

	@Input() public currentUrl: String = "";

	@Input() public nav;

	public sidebarShrinkFlag = false;
	constructor(
		public router: Router
	) {
	}

	ngOnInit() {
	}
	/**
	 * 改变菜单栏收缩时图标与sidebar左边距
	 * 
	 */
	toggleSidebar(flag) {
		this.sidebarShrinkFlag = !this.sidebarShrinkFlag;
	}
}